package com.mzj.saas.mservice.eligible.repository;

import com.mzj.saas.mservice.eligible.entity.AuditorFlow;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface AuditorFlowRepository extends PagingAndSortingRepository<AuditorFlow, Long>, JpaSpecificationExecutor<AuditorFlow> {

    AuditorFlow findByAreaId(Long areaId);

    List<AuditorFlow> findByAuditorCodeOrderByNum(String auditorCode);
    List<AuditorFlow> findByAuditorCode(String auditorCode);
    List<AuditorFlow> findByAreaIdIn(List<Long> areaIds);
    @Transactional
     void  deleteByAuditorCode(String auditorCode);
    AuditorFlow findByAuditorOrgIdAndAreaId(Long orgId,Long areaId);
}
